# 1 导包
import time
import unittest
import HTMLTestRunner_PY3

# 2 创建测试套件
import app
from script.test_emp_params import TestEmployeeParams
from script.test_login_params import TestLoginParams

suite = unittest.TestSuite()
# 3 将测试用例添加到测试套件
suite.addTest(unittest.makeSuite(TestLoginParams))
suite.addTest(unittest.makeSuite(TestEmployeeParams))
# 4 初始化runner
with open(app.BASE_DIR + f'/report/remort{time.strftime("%y%m%d %H%M%S")}.html', 'wb') as f:
    runner = HTMLTestRunner_PY3.HTMLTestRunner(f)
    # 5 执行测试套件生成测试报告
    runner.run(suite)
print("*" * 100)
